<!DOCTYPE html>
{% load i18n plmapp_tags %}

<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="content-type" content="text/html"; charset="utf-8"/>
        <link href="{{STATIC_URL}}css/bootstrap.min.prefixed.css" rel="stylesheet" media="screen">
        <link type="text/css" href="{{STATIC_URL}}css/openplm/jquery-ui.css" rel="Stylesheet" /> 
        <link rel="stylesheet" type="text/css" href="{{STATIC_URL}}css/openplm.css" />
        <link rel="stylesheet" type="text/css" href="{{STATIC_URL}}css/loginpage.css" />
        <link rel="stylesheet" href="{{STATIC_URL}}css/chosen.css" type="text/css" media="screen" charset="utf-8" />
        <script type="text/javascript" src="{{STATIC_URL}}js/jquery.min.js"></script>
        <script type="text/javascript" src="{{STATIC_URL}}js/jquery-ui.min.js"></script>
        <script type="text/javascript" src="{{STATIC_URL}}js/jquery.cookie.js"></script>
        <script type="text/javascript" src="{{STATIC_URL}}js/jquery.hoverIntent.minified.js"></script>
        <script type="text/javascript" src="{{STATIC_URL}}js/chosen.jquery.min.js"></script>
        <script type="text/javascript" src="{{STATIC_URL}}js/plmapp.js"></script>
        <title>{% trans "openPLM LOGIN PAGE" %}</title>
        <meta name="Author" content="philippe.joulaud" />
        <meta name="Classification" content="" />
        <meta name="Description" content="" />
        <meta name="keywords" content="" />
    </head>

    <body>
        <div class="main-box">
            <div class="top-box">
                <div id="home">
                    <a href="/home/">
                        <img title="Page d'accueil" alt="logo-openplm" src="/static/img/dark/logo_openplm_linear.png"></img>
                    </a>
                </div>
                <div class="important" >
                    <p style="color: white;"> {% trans "Welcome to OpenPLM." %}
                        <span style="font-weight:bold; color: white">openPLM</span> {% trans "is the first genuine open source PLM."%} 
                        <br/>
                        {% trans "For more information about openPLM, see" %} <a href="http://www.openplm.org">http://www.openplm.org</a>.
                    </p>
                </div>
                <form id="SetLangForm" action="/i18n/setlang/" method="post">{% csrf_token %}
                    <ul>
                        <li>
                        <select name="language">

                            {% for lang in LANGUAGES %}
                                <option value="{{ lang.0 }}" {% ifequal LANGUAGE_CODE lang.0 %} selected="selected"{% endifequal %} >
                                {{ lang.1 }}
                                </option>
                            {% endfor %}
                        </select>
                        </li>
                        <li>
                        <input type="submit" class="tb-btn" value="{% trans "Go" %}" />
                        </li>
                    </ul>
                </form>
            </div>
            
            <div class="content-box">
                <div class="box" id="Login-box" style="right: 10%; top: 15%">
                    <h2 style="margin-bottom: 5px;">{% trans "openPLM connexion :" %}</h2>
                    {% if form.errors %}
                         <div class="error">
                              <p>{% trans "Your username and password didn't match. Please try again." %}</p>
                        </div>
                    {% endif %}

                    <form action="{% url 'django.contrib.auth.views.login' %}" method="post">{% csrf_token %}
                        <table style="display:inline-block">
                            <tr>
                                <td>{% trans "Login :" %}</td>
                                <td><input type="text" name="username" value=""/></td>
                            </tr>
                            <tr>
                                <td>{% trans "Password :" %} </td>
                                <td><input type="password" name="password" value=""/></td>
                            </tr>
                            <tr>
                                <td></td>
                                <td><input type="submit" class="tb-btn" value="{% trans "LOGIN" %}" /></td>
                            </tr>
                        </table>
                        <input type="hidden" name="next" value="{{ next|default:"/home/"|iriencode }}"/>
                    </form>
                    <p style="font-size:10px; line-height:15px; text-align:left">{% trans "*If you have any trouble logging in to your account, contact your administrator" %} </p>
                    <hr />
                    <a href="/browse/object/">{% trans "Browse public data." %}</a>
                    </p>
                    <hr />
                    <p>
                        {% trans "If you are planning to use openPLM in a <b>professional</b> context. If you want to work with other professionals for your project management, for other solutions plugins, for openPLM software maintenance, " %}
                        <a href="http://www.linobject.com/contact/">
                            {% trans "contact us" %}.
                        </a>
                    </p>
                </div>
            </div>
        
            
            <div id="bottom-box">
                <div id="links"><div class="legal">
                    2010-2013 openPLM ™ 
                    <a target="_blank" href="http://www.gnu.org/licenses/gpl-3.0.html">
                        GNU General Public License
                    </a>
      
                        - 
                    <a target="_blank" href="http://wiki.openplm.org/trac/wiki/Credits">
                      Credits
                    </a>
                </div>
                <a id="linobject" href="http://www.linobject.com">
                      Powered by LinObject
                </a>
            </div>
        </div>
        <script type="text/javascript">
             var nb = Math.floor(Math.random() * 5 + 1);
             document.getElementsByClassName("content-box")[0].style.backgroundImage="url(/static/img/dark/background-login-page"+nb+".jpg)";
        </script>
    </body>
</html>
